Parity based method for reconstructing a data subset wherein said subset belongs to multiple parity sets

ABSTRACT

Method and apparatus for protecting data comprising dividing data into a plurality of data subsets. Generating parity data for each data subset and another data subset of the plurality of data subsets. Generating parity data for each data subset and a second other data subset of the plurality of data subsets. Method and apparatus for recovering data comprising retrieving one or more data subsets. Retrieving two or more different parity data sets generated for one data subset. Regenerating any missing data subsets using the retrieved one or more data subset and two or more retrieved parity data sets. Combining the one or more retrieved data subset and regenerated missing data subsets to form the recovered data.

FIELD OF THE INVENTION

The present invention relates to a method and apparatus for generating parity data and in particular for use in error correction and data reconstruction.

BACKGROUND OF THE INVENTION

Parity data is used to achieve redundancy when storing or transmitting data. Parity data may be used to check that read or received data is correct or to regenerate any missing data, for example, when a disc drive or communication channel fails. Typically, parity data is generated using the exclusive or (XOR) logical function applied to two or more data sets or subsets.

Such redundancy is used in certain RAID disc arrays such as RAID 5, for example.

Although the parity schemes used in RAID arrays may be sufficient to provide the necessary redundancy in a controlled environment using monitored disc drives within a single cabinet or data centre, the level of redundancy may not be suitable for more distributed or ad-hoc storage mechanisms, which may incorporate storage devices or disc drives remote from each other or separated across a network. Furthermore, many RAID systems are limited being able to respond and recover from single points of failure such as a single disk failing. Multiple simultaneous failures in RAID arrays may not be recoverable.

Therefore, there is required a method and system that overcomes these problems.

SUMMARY OF THE INVENTION

Against this background and in accordance with a first aspect there is provided a method of protecting data comprising the steps of: dividing data into a plurality of data subsets; generating parity data for each data subset and another data subset of the plurality of data subsets; and generating parity data for each data subset and a second other data subset of the plurality of data subsets. This method processes data to secure it or protect it from loss or corruption. Any missing data subsets may be recoverable from the generated parity data and remaining data subsets. This method may also provide more resilience to multiple simultaneous failures, for example when more than one disk drive fails at the same time or when multiple remote storage locations become unavailable or inaccessible.

Optionally, the method may further comprise the step of storing the plurality of data subsets and the generated parity data. These may be stored in disk drives, flash drives, computers, servers or other data stores or a mixture of these. The storage locations may be remote from each other or local and may be accessible over a network such as the Internet, for example.

Optionally, the method may further comprise the step of transmitting the plurality of data subsets and the generated parity data. Transmission may be by means of wireless or wired transmission including but not limited to Ethernet and mobile telecommunications.

Preferably, at least two sets of parity data are generated for every data subset. More than two parity data sets may also be generated.

Optionally, each data subset may have parity data generated for its two neighbouring data subsets. For data divided into sequences the neighbours may be sequential.

Optionally, parity data may be generated for the first data subset with last data subset. In other words, the combinations are arranged cyclically.

Preferably, the parity data may be generated using the exclusive OR, XOR, logical operator. Other logical operators may be used.

Optionally, the data may be divided into an odd number of data subsets. An even number may also be used.

Preferably, the data may be divided into a predetermined number of data subsets.

According to a second aspect there is provided a method of recovering data comprising the steps of: retrieving a data subset; retrieving parity data generated as described above; regenerating any missing data subsets using the retrieved data subset and retrieved parity data; and combining the retrieved data subset and regenerated missing data to form the recovered data.

According to a third aspect there is provided a method of recovering data comprising the steps of: retrieving one or more data subsets; retrieving two or more different parity data sets generated for one data subset; regenerating any missing data subsets using the retrieved one or more data subset and two or more retrieved parity data sets; and combining the one or more retrieved data subset and regenerated missing data subsets to form the recovered data. The data subsets and/or parity data sets may be recovered from storage mechanisms or locations or received as signals, for example.

According to a fourth aspect there is provided apparatus for generating parity data comprising: a processor configured to: divide data into a plurality of data subsets, generate parity data for each data subset and another data subset of the plurality of data subsets, and generate parity data for each data subset and a second other data subset of the plurality of data subsets.

Optionally, the apparatus may be selected from the group consisting of: a computer, mobile computer, cell phone, handset, server, transmitter, disk and drive controller. Other apparatus or processors may be used.

The method described above may be implemented as a computer program comprising program instructions to operate a computer. The computer program may be stored on a computer-readable medium.

It should be noted that any feature described above may be used with any particular aspect or embodiment of the invention.

BRIEF DESCRIPTION OF THE FIGURES

The present invention may be put into practice in a number of ways and embodiments will now be described by way of example only and with reference to the accompanying drawings, in which:

FIG. 1 shows a schematic diagram indicating a method for generating parity data, given by way of example only;

FIG. 2 shows a schematic diagram of an illustrative method for reconstructing missing data using parity data generated in accordance with the method shown in FIG. 1;

FIG. 3 shows a schematic diagram of a further illustrative method for reconstructing missing data using the parity data generated using the method of FIG. 1; and

FIG. 4 shows a system for generating parity data according to the method shown in FIG. 1.

It should be noted that the figures are illustrated for simplicity and are not necessarily drawn to scale.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Parity data may be generated using the exclusive OR function (XOR). For example:

(A)0100̂(B)0010=(P)0110   equation 1

where ̂is the XOR function.

Should either data set A or B be lost, then the missing data may be reconstructed from the remaining data and the parity data (P) using the same XOR function, for example:

(A)0100̂(P)0110=(B)0010   equation 2

In order to generate redundant data to protect a particular data file or data set, then this original data (F) may be divided into equal blocks or subsets. This may be represented as:

F{1, 2, 3, . . . n}  equation 3

Parity data may be generated as:

1̂2, 3̂4, . . . (n−1)̂n  equation 4

FIG. 1 shows a method 10 for generating more robust sets of parity data. This method 10 allows for a greater number of data subset (and/or parity data) losses before the data becomes unrecoverable. The solid numbered circles 1, 2, 3, . . . n, represent data subsets formed by dividing the original data. Two sets of parity data are generated for each data subset. Each data subset is paired with another data subset and parity data is generated. The data subset is then paired with a different data subset and a further set of parity data is generated. In other words, each data subset is associated with two different other data subsets with parity data generated for each pairing. For example, in FIG. 1 this is shown as each data subset being paired with both of its neighbours (e.g. 2 paired with 1 and 2 also paired with 3). The first (1) and last (n) data subsets only have one neighbour (2 and n−1 respectively). Therefore, the first data subset is paired with the last data subset so that more than one set of parity data may be associated with the end data sets. However, any other combination and permutation may be used so that each data subset has at least two parity data sets associated with it. In notation form, this may be described as:

C₁{1̂2, 3̂4, . . . (n−1)̂n}

C₂{2̂3, 3̂4, . . . n̂1}  equation 5

In an example where the original data is divided into five data subsets, the loss of four data subsets may still enable reconstruction of all of the original data provided that all of the parity data sets are retrievable. Such a situation is shown in FIG. 2, which schematically shows an example method 100 for reconstructing or regenerating missing data subsets.

In this example, the third data subset is available as well as the five parity data sets (1̂2, 2̂3, 3̂4, 4̂5 and 5̂1). The box in FIG. 2 shows two alternative ways in which each of the missing data subsets 1, 2, 4 and 5 may be reconstructed using the XOR function.

FIG. 3 shows a further example situation in which, five data subsets and created from original data but where two of the data subsets and two of the parity data sets (2̂3 and 3̂4) are lost or missing. In this particular reconstruction method 200, the two missing data subsets 2 and 4 are recovered using the XOR operations shown in the side box.

In general terms, the loss of data subsets in any combination up to (n−1) may still result in all of the data being recoverable.

It is noted that the particular examples shown in FIGS. 2 and 3 are two of many alternative combinations and schemes for recovering data. Furthermore, it is noted that the cyclic approach shown in FIG. 1 for generating two parity data sets for each data subset is one of many alternatives. For example, each data subset may be paired with non-neighbouring subsets to form parity data.

When dividing the data into data subsets, a predetermined number of data subsets may be chosen. This may relate to the number of available or required storage locations (for each data subset and each parity data set) that are to be used, or separate data channels or other means of transmitting the data subsets from one location to another.

FIG. 4 shows a system 300 for implementing the methods described with reference to FIGS. 1 to 3. This is an example system and others may be contemplated by the skilled person. In this particular example, a server 310 may be used to divide the data into data subsets and generate the parity data. These data subsets and parity data may then be stored in separate storage locations 330, which may distributed or remote from each other across a network or located together in a storage cabinet, for example. A separate computer or processor 340 may retrieve the data from the storage locations 330 (e.g. disc drives). The computer 340 may regenerate or reconstruct any missing data in accordance with the example schemes shown with regards to FIG. 2 or 3.

A benefit of generating more than one set of parity data for each data subset is the increase redundancy allowing for a greater proportion of data loss than by relying on a single parity data set associated with each data subset.

As well as disc arrays, distributed storage systems and cloud storage systems (for example), the described method and system for generating parity data may be used in many other situations where data reliability and security is necessary or required. For example, this scheme of parity generation may be used in receiving and transmitting data across a wired network, wireless network or mobile network, or for storing data in physical media such as optical discs, for example.

As will be appreciated by the skilled person, details of the above embodiment may be varied without departing from the scope of the present invention, as defined by the appended claims.

For example, other logical functions may be used in place of the XOR function to derive parity data.

The number of separate or different parity data sets created for each data subset is not limited to two but may be greater. For example, each data subset may be paired with up to every other data subset creating:

$\begin{matrix} \frac{n!}{{k!}{\left( {n - k} \right)!}} & {{equation}\mspace{14mu} 6} \end{matrix}$

parity data sets, where n is the number of data subsets and k is the number of data subsets compared to create parity data (k≦n). In an example, four data subsets may be created (n=4) from pairs (k=2) of data subsets so that six different parity data set may be formed that could populate six separate storage locations.

In order to divide the original data into larger numbers of data subsets (e.g. every 512 bytes) without requiring very large numbers of separate storage locations, each storage location may store many separate data subsets and/or parity data sets. So long as the storage scheme is known reconstruction may be successfully achieved.

Many combinations, modifications, or alterations to the features of the above embodiments will be readily apparent to the skilled person and are intended to form part of the invention. Any of the features described specifically relating to one embodiment or example may be used in any other embodiment by making the appropriate changes. 

1. A method of protecting data comprising the steps of:) a) dividing data into a plurality of data subsets; b) generating parity data for each data subset and another data subset of the plurality of data subsets; c) generating parity data for each data subset and a second other data subset of the plurality of data subsets d) storing the plurality of data subsets and the generated parity data in a distributed storage system; e) retrieving one or more data subsets; f) retrieving two or more different parity data sets generated for one data subset; g) regenerating any missing data subsets using the retrieved one or more data subset and two or more retrieved parity data sets; and h) combining the one or more retrieved data subset and regenerated missing data subsets to form the recovered data, wherein steps a) to d) are performed by a processor and steps e) to h) are performed by a separate computer or processor. 2-3. (canceled)
 4. The method according to claim 1, wherein at least two sets of parity data are generated for every data subset.
 5. The method according to claim 1, wherein the each data subset has parity data generated for its two neighbouring data subsets.
 6. The method according to claim 1, wherein parity data are generated for the first data subset with last data subset.
 7. The method according to claim 1, wherein the parity data are generated using the exclusive OR, XOR, logical operator.
 8. The method according to claim 1, wherein the data are divided into an odd number of data subsets.
 9. The method according to claim 1, wherein the data are divided into a predetermined number of data subsets. 10-11. (canceled)
 12. A system for protecting data comprising: a processor configured to: divide data into a plurality of data subsets, generate parity data for each data subset and another data subset of the plurality of data subsets, generate parity data for each data subset and a second other data subset of the plurality of data subsets, and store the plurality of data subsets and the generated parity data in a distributed storage system; and a separate processor or computer configured to: retrieve one or more data subsets, retrieve two or more different parity data sets generated for one data subset, regenerate any missing data subsets using the retrieved one or more data subset and two or more retrieved parity data sets, and combine the one or more retrieved data subset and regenerated missing data subsets to form the recovered data.
 13. The system of claim 12, wherein the processor is provided within one of: a computer, mobile computer, cell phone, handset, server, transmitter, disk or drive controller. 14-16. (canceled) 